package edu.sctu.zcy.month201505.subwaysystem.V1;

import java.util.Random;


/**
 * Created by user24 on 2015/5/31.
 */
public class PassengerInfo {


    Random random = new Random();

//    Scanner inputInfo = new Scanner(System.in);

    public boolean subwayCard = random.nextBoolean();
    public boolean packageOfpassenger = random.nextBoolean();
    public boolean waterOfpassenger = random.nextBoolean();


//   List<PassengerInfo> passengerInfos = new ArrayList<>();


    PassengerInfo[] passengerInfos = new PassengerInfo[10];

    public PassengerInfo[] setPassengerInfos(int i ) {


            PassengerInfo p = new PassengerInfo();

            if (p.subwayCard == true) {

                passengerInfos[i] = p;
            }
            if (p.packageOfpassenger = true) {

                passengerInfos[i] = p;

            }
            if (p.waterOfpassenger = true) {

                passengerInfos[i] = p;
            }



        return passengerInfos;
    }


    public void getPassenger(int i) {



        PassengerInfo[] passengerInfos = new PassengerInfo().setPassengerInfos(i);

           if (passengerInfos[i].subwayCard) {

               System.out.println("乘客" + (i + 1 ) + "有地铁卡");

           } else {
                System.out.println("请买票！");


            }
            if (passengerInfos[i].packageOfpassenger) {
                System.out.println("乘客" + (i + 1 ) + "有包裹");
            }
            if (passengerInfos[i].waterOfpassenger) {
                System.out.println("乘客" + (i + 1) + "有水");

            }


    }
}